function ClassDecorator(name: string) {
  return function(target: Function) {
    target.prototype[name] = function() {
      console.log(this.age);
    }
  }
}

@ClassDecorator('say')
class Test {
  constructor(public age: number) {}
}

let test: Test = new Test(23);